package com.jiang.factory;

public class ServiceFactory {

	private ServiceFactory(){
		
	}
	
	/**
	 * @获取ServiceImpl类对象
	 * @return
	 */
	public static<T> T getInstance(Class<T> clazz) {
		
		T t = null;
		try {
			t = clazz.newInstance();
		} catch (InstantiationException e) {
			e.printStackTrace();
		} catch (IllegalAccessException e) {
			e.printStackTrace();
		}
		return t;
	}
	
}
